﻿using System;
using System.Web.Mvc;

namespace Fuse8.CMF.BaseWebsite.Administration.Web
{
    public class ApplicationRoutes : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Base CMF application";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.Routes.IgnoreRoute("assets/{*pathInfo}");

            context.MapRoute(
                "Application_Generic",
                "{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                new { isInApplication = new ApplicationRouteConstraint() },
                new string[] { "Fuse8.CMF.BaseWebsite.ViewController.Controllers" });
        }
    }
}